<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>新闻搜索</title>

    <div th:include="common :: headcommon"></div>
    <script src="/js/index/article.js" type="text/javascript"></script>
    <script type="text/javascript">

    </script>
</head>
<body>

<div th:replace="common :: #top_start"></div>

<div class="layui-container container">

    <div class="layui-row layui-col-space20">
        <div class="layui-col-md8">
            <div>
              <span class="layui-breadcrumb">
          <a th:href="@{/index}">首页</a>
          <a><cite >搜索结果：[[${keyword}]]</cite></a>
        </span>
                <hr class="layui-bg-red">
<!--                搜索结果为空-->
                <div th:if="${articles.size()==0}"><h1 class="no_comment">抱歉，没有找到与“[[${keyword}]]”相关的新闻内容</h1></div>
<!--                搜素结果不为空-->
                <div th:if="${articles.size()!=0}" th:each="article:${articles}" class="article-list" style="padding-top:10px;">
<!--                    <figure><img src="/images/01.jpg" th:src="@{${article.imgSrc}}"></figure>-->
                    <ul>
                        <h3>
                            <a th:href="@{/article/details/{id}(id=${article.getId()})}" th:text="${article.title}">住在手机里的朋友</a>
                        </h3>
                        <div class="areahigh">
                        <p th:utext="${article.content}">新闻内容</p>
                        </div>
                        <p class="autor">
                            <span class="lm f_l" th:each="cate:${session.cateList}" th:if="${cate.cid==article.cid}">
                                <a href="#" th:href="@{/cate/CateArticle/{cid}(cid=${cate.cid})}" th:text="${cate.cname}">个人博客</a>
                            </span>
                            <span class="dtime f_l" th:text="${#dates.format(article?.createTime, 'yyyy-MM-dd')}">2014-02-19</span>
                            <span class="viewnum f_r">浏览（<a href="#" th:text="${article.checkNum}">459</a>）</span>
                    </ul>
                </div>

            </div>

        </div>

        <!--        左边栏-->
        <div class="layui-col-md4">

            <form class="layui-form" method="post" action="/article/search">
                <div class="layui-form-item">
                    <div class="layui-input-inline" style="width:76%;">
                        <input type="text" name="keyword" lay-verify="required" placeholder="请输入关键字" class="layui-input">
                    </div>
                    <button type="submit" class="layui-btn" lay-filter="search" lay-submit>搜索</button>
                </div>
            </form>

            <div class="ad"><img lay-src="/images/ad.jpg"></div>
            <div class="ms-top">
                <ul class="hd" id="tab">
                    <li class="cur"><a>点击排行</a></li>
                </ul>
            </div>
            <div class="ms-main" id="ms-main">
                <div style="display: block;" class="bd bd-news">
                    <ul>
                        <li th:each="rowlist:${session.rowLists}"><a href="#" target="_blank"
                                                                     th:text="${rowlist.getTitle()}"
                                                                     th:href="@{/article/details/{id}(id=${rowlist.getId()})}">住在手机里的朋友</a>
                        </li>

                    </ul>
                </div>

            </div>

            <div>
                <div class="bd-news">
                    <h3 class="per_test">最新新闻</h3>
                    <ul>
                        <li th:each="newList:${session.newLists}"><a href="#" target="_blank"
                                                                     th:text="${newList.getTitle()}"
                                                                     th:href="@{/article/details/{id}(id=${newList.getId()})}">原来以为，一个人的勇敢是，删掉他的手机号码...</a>
                        </li>

                    </ul>
                </div>
            </div>


            <div class="tuwen">
                <h3>最新评论新闻</h3>
                <ul>
                    <!--                    <li><a href="#"><img lay-src="/images/01.jpg"><b>住在手机里的朋友</b></a>-->
                    <li th:each="newArt:${session.newComArt}" style="width: 320px;">
                        <a href="#" th:href="@{/article/details/{id}(id=${newArt.getId()})}"><b
                                th:text="${newArt.getTitle()}" class="newComArt">住在手机里的朋友</b></a>
                        <p><span class="tulanmu">
                            <a th:each="category:${session.cateList}" href="#" target="_blank" th:if="${category.cid==newArt.cid}"
                               th:text="${category.getCname()}"
                               th:href="@{/cate/CateArticle/{cid}(cid=${category.cid})}">新闻分类</a></span>
                            <span class="tutime"
                                  th:text="${#dates.format(newArt?.createTime, 'yyyy-MM-dd')}">2015-02-15</span>
                        </p>
                    </li>
                </ul>
            </div>


            <div class="ad"><img lay-src="/images/03.jpg"></div>
            <div class="links">
                <h3>友情链接</h3>
                <!--                <h3><span>[<a href="#">申请友情链接</a>]</span>友情链接</h3>-->
                <ul>
                    <li><a href="https://www.runoob.com/" target="_blank">菜鸟教程</a></li>
                    <li><a href="https://www.w3school.com.cn/index.html" target="_blank">W3school</a></li>
                    <li><a href="https://www.layui.com" target="_blank">Layui官网</a></li>
                    <li><a href="http://www.baidu.com"  target="_blank">百度</a></li>
                    <li><a href="https://news.163.com/" target="_blank">网易新闻</a></li>
                    <li><a href="http://news.sohu.com/" target="_blank">搜狐新闻</a></li>
                    <li><a href="https://news.qq.com/" target="_blank">腾讯新闻</a></li>
                    <li><a href="https://news.sina.com.cn/" target="_blank">新浪新闻</a></li>
                </ul>
            </div>

        </div>
    </div>
</div>

<div th:replace="common :: #foot_start"></div>

</body>
</html>
